<?php

class Socialnetwork
{
    /*
    * $send_button: true, false
    * $layout: standard, button_count, box_count 
    * $show_faces: true, false
    * $colorscheme: dark, light
    * $font: arial, lucida grande, segoe ui, tahoma, trebuchet ms, verdana
    */
    /*function fb_like($url, $send_button='true', $layout='standard', $width=450, $show_faces='true', $action='like', $colorscheme = 'light', $font = 'verdana'){
       return '<script src="http://connect.facebook.net/hu_HU/all.js#xfbml=1"></script><fb:like href="'.$url.'" send="'.$send_button.'" layout="'.$layout.'" width="'.$width.'" show_faces="'.$show_faces.'" action="'.$action.'" colorscheme="'.$colorscheme.'" font="'.$font.'"></fb:like>';
    }*/
    
    function fb_like(){
       return '<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/hu_HU/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));</script>
<div class="fb-like" data-send="false" data-width="350" data-show-faces="true"></div>';
    }
    
    /*
     * $type: button, icon, icon_link
     */
    function fb_share($url, $type, $caption){
        return '<a name="fb_share" type="'.$type.'" share_url="'.$url.'">'.$caption.'</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>';
    }
    
    function twitter_share(){
        return '<a href="https://twitter.com/share" class="twitter-share-button" data-lang="hu">Tweet</a>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>';
    }
    
    function google_share(){
        return '<!-- Helyezze ezt a címkét oda, ahol a +1 gombot szeretné megjeleníteni -->
<g:plusone size="medium" annotation="inline"></g:plusone>

<!-- Helyezze ezt a megjelenítési hívást a megfelelő helyre -->
<script type="text/javascript">
  window.___gcfg = {lang: "hu"};

  (function() {
    var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;
    po.src = "https://apis.google.com/js/plusone.js";
    var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s);
  })();
</script>';
    }
}
?>
